package com.wzx.ptplatform.controller;

import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;

/**
 * @author 紫煦桉
 */
@Api(tags = "退出登录模块")
@RestController
public class LogOutController {

    @RequestMapping("admin_log_out")
    public ModelAndView adminLogOut(HttpSession session) {
        session.invalidate();
        return new ModelAndView("admin/login");
    }

    @RequestMapping("university_log_out")
    public ModelAndView universityLogOut(HttpSession session) {
        session.invalidate();
        return new ModelAndView("university/login");
    }

    @RequestMapping("student_log_out")
    public ModelAndView studentLogOut(HttpSession session) {
        session.invalidate();
        return new ModelAndView("student/login");
    }

    @RequestMapping("company_log_out")
    public ModelAndView companyLogOut(HttpSession session) {
        session.invalidate();
        return new ModelAndView("company/login");
    }
}
